﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

namespace PioneerBoilerplate.Migrations.Migrations
{
    public partial class AddDBCreatedTimestamp : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "Apis",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false),
                    ParentId = table.Column<long>(type: "bigint", nullable: false),
                    Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Label = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Path = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    HttpMethods = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Description = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Sort = table.Column<int>(type: "int", nullable: false),
                    Enabled = table.Column<bool>(type: "bit", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true),
                    CreatedUserName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    ModifiedUserId = table.Column<long>(type: "bigint", nullable: true),
                    ModifiedUserName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ModifiedTime = table.Column<DateTime>(type: "datetime2", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Apis", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Books",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Description = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Books", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "DictionariesTypes",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false),
                    Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Code = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Description = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Enabled = table.Column<bool>(type: "bit", nullable: false),
                    Sort = table.Column<int>(type: "int", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true),
                    CreatedUserName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    ModifiedUserId = table.Column<long>(type: "bigint", nullable: true),
                    ModifiedUserName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ModifiedTime = table.Column<DateTime>(type: "datetime2", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_DictionariesTypes", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Documents",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false),
                    ParentId = table.Column<long>(type: "bigint", nullable: false),
                    Label = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Type = table.Column<int>(type: "int", nullable: false),
                    Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Content = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Html = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Enabled = table.Column<bool>(type: "bit", nullable: false),
                    Opened = table.Column<bool>(type: "bit", nullable: true),
                    Sort = table.Column<int>(type: "int", nullable: true),
                    Description = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true),
                    CreatedUserName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    ModifiedUserId = table.Column<long>(type: "bigint", nullable: true),
                    ModifiedUserName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ModifiedTime = table.Column<DateTime>(type: "datetime2", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Documents", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "LoginLogs",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true),
                    CreatedUserName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    NickName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IP = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Browser = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Os = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Device = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    BrowserInfo = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ElapsedMilliseconds = table.Column<long>(type: "bigint", nullable: false),
                    Status = table.Column<bool>(type: "bit", nullable: false),
                    Msg = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Result = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_LoginLogs", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "OprationLogs",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false),
                    ApiLabel = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ApiPath = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ApiMethod = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Params = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true),
                    CreatedUserName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    NickName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IP = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Browser = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Os = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Device = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    BrowserInfo = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ElapsedMilliseconds = table.Column<long>(type: "bigint", nullable: false),
                    Status = table.Column<bool>(type: "bit", nullable: false),
                    Msg = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Result = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_OprationLogs", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Roles",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false),
                    Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Code = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Description = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Enabled = table.Column<bool>(type: "bit", nullable: false),
                    Sort = table.Column<int>(type: "int", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true),
                    CreatedUserName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    ModifiedUserId = table.Column<long>(type: "bigint", nullable: true),
                    ModifiedUserName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ModifiedTime = table.Column<DateTime>(type: "datetime2", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Roles", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "SaveChangesAudits",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    AuditId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                    StartTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    EndTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    Succeeded = table.Column<bool>(type: "bit", nullable: false),
                    ErrorMessage = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SaveChangesAudits", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Users",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false),
                    UserName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Password = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    NickName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Avatar = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Status = table.Column<int>(type: "int", nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true),
                    CreatedUserName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    ModifiedUserId = table.Column<long>(type: "bigint", nullable: true),
                    ModifiedUserName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ModifiedTime = table.Column<DateTime>(type: "datetime2", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Users", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Views",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false),
                    ParentId = table.Column<long>(type: "bigint", nullable: false),
                    Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Label = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Path = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Description = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Enabled = table.Column<bool>(type: "bit", nullable: false),
                    Cache = table.Column<bool>(type: "bit", nullable: false),
                    Sort = table.Column<int>(type: "int", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true),
                    CreatedUserName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    ModifiedUserId = table.Column<long>(type: "bigint", nullable: true),
                    ModifiedUserName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ModifiedTime = table.Column<DateTime>(type: "datetime2", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Views", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Dictionaries",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false),
                    DictionaryTypeId = table.Column<long>(type: "bigint", nullable: false),
                    Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Code = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Value = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Description = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Enabled = table.Column<bool>(type: "bit", nullable: false),
                    Sort = table.Column<int>(type: "int", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true),
                    CreatedUserName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    ModifiedUserId = table.Column<long>(type: "bigint", nullable: true),
                    ModifiedUserName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ModifiedTime = table.Column<DateTime>(type: "datetime2", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Dictionaries", x => x.Id);
                    table.ForeignKey(
                        name: "FK_Dictionaries_DictionariesTypes_DictionaryTypeId",
                        column: x => x.DictionaryTypeId,
                        principalTable: "DictionariesTypes",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "DocumentImages",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false),
                    DocumentId = table.Column<long>(type: "bigint", nullable: false),
                    Url = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true),
                    CreatedUserName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_DocumentImages", x => x.Id);
                    table.ForeignKey(
                        name: "FK_DocumentImages_Documents_DocumentId",
                        column: x => x.DocumentId,
                        principalTable: "Documents",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "Audits",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    State = table.Column<int>(type: "int", nullable: false),
                    AuditMessage = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SaveChangesAuditId = table.Column<long>(type: "bigint", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Audits", x => x.Id);
                    table.ForeignKey(
                        name: "FK_Audits_SaveChangesAudits_SaveChangesAuditId",
                        column: x => x.SaveChangesAuditId,
                        principalTable: "SaveChangesAudits",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                });

            migrationBuilder.CreateTable(
                name: "UserRoles",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false),
                    UserId = table.Column<long>(type: "bigint", nullable: false),
                    RoleId = table.Column<long>(type: "bigint", nullable: false),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true),
                    CreatedUserName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_UserRoles", x => x.Id);
                    table.ForeignKey(
                        name: "FK_UserRoles_Roles_RoleId",
                        column: x => x.RoleId,
                        principalTable: "Roles",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_UserRoles_Users_UserId",
                        column: x => x.UserId,
                        principalTable: "Users",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "Permissions",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false),
                    ParentId = table.Column<long>(type: "bigint", nullable: false),
                    Label = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Code = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Type = table.Column<int>(type: "int", nullable: false),
                    ViewId = table.Column<long>(type: "bigint", nullable: true),
                    Path = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Icon = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Hidden = table.Column<bool>(type: "bit", nullable: false),
                    Enabled = table.Column<bool>(type: "bit", nullable: false),
                    Closable = table.Column<bool>(type: "bit", nullable: true),
                    Opened = table.Column<bool>(type: "bit", nullable: true),
                    NewWindow = table.Column<bool>(type: "bit", nullable: true),
                    External = table.Column<bool>(type: "bit", nullable: true),
                    Sort = table.Column<int>(type: "int", nullable: true),
                    Description = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    PermissionEntityId = table.Column<long>(type: "bigint", nullable: true),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true),
                    CreatedUserName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    ModifiedUserId = table.Column<long>(type: "bigint", nullable: true),
                    ModifiedUserName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ModifiedTime = table.Column<DateTime>(type: "datetime2", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Permissions", x => x.Id);
                    table.ForeignKey(
                        name: "FK_Permissions_Permissions_PermissionEntityId",
                        column: x => x.PermissionEntityId,
                        principalTable: "Permissions",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                    table.ForeignKey(
                        name: "FK_Permissions_Views_ViewId",
                        column: x => x.ViewId,
                        principalTable: "Views",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                });

            migrationBuilder.CreateTable(
                name: "PermissionApis",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false),
                    PermissionId = table.Column<long>(type: "bigint", nullable: false),
                    ApiId = table.Column<long>(type: "bigint", nullable: false),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true),
                    CreatedUserName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_PermissionApis", x => x.Id);
                    table.ForeignKey(
                        name: "FK_PermissionApis_Apis_ApiId",
                        column: x => x.ApiId,
                        principalTable: "Apis",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_PermissionApis_Permissions_PermissionId",
                        column: x => x.PermissionId,
                        principalTable: "Permissions",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "RolePermissions",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false),
                    RoleId = table.Column<long>(type: "bigint", nullable: false),
                    PermissionId = table.Column<long>(type: "bigint", nullable: false),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true),
                    CreatedUserName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_RolePermissions", x => x.Id);
                    table.ForeignKey(
                        name: "FK_RolePermissions_Permissions_PermissionId",
                        column: x => x.PermissionId,
                        principalTable: "Permissions",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_RolePermissions_Roles_RoleId",
                        column: x => x.RoleId,
                        principalTable: "Roles",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.InsertData(
                table: "Apis",
                columns: new[] { "Id", "CreatedTime", "CreatedUserId", "CreatedUserName", "Description", "Enabled", "HttpMethods", "IsDeleted", "Label", "ModifiedTime", "ModifiedUserId", "ModifiedUserName", "Name", "ParentId", "Path", "Sort" },
                values: new object[,]
                {
                    { 161227167658053L, null, null, null, "", true, null, false, "接口管理", null, null, null, null, 0L, "api", 0 },
                    { 161227168247878L, null, null, null, "", true, "delete", false, "删除租户", null, null, null, null, 161227167723593L, "/api/admin/tenant/softdelete", 0 },
                    { 161227168247877L, null, null, null, "", true, "put", false, "修改租户", null, null, null, null, 161227167723593L, "/api/admin/tenant/update", 0 },
                    { 161227168243783L, null, null, null, "", true, "post", false, "新增租户", null, null, null, null, 161227167723593L, "/api/admin/tenant/add", 0 },
                    { 161227168243782L, null, null, null, "", true, "post", false, "查询分页租户", null, null, null, null, 161227167723593L, "/api/admin/tenant/getpage", 0 },
                    { 161227168243781L, null, null, null, "", true, "get", false, "查询单条租户", null, null, null, null, 161227167723593L, "/api/admin/tenant/get", 0 },
                    { 161227168239686L, null, null, null, "", true, "delete", false, "删除图片", null, null, null, null, 161227167723592L, "/api/admin/document/deleteimage", 0 },
                    { 161227168239685L, null, null, null, "", true, "get", false, "查询文档图片列表", null, null, null, null, 161227167723592L, "/api/admin/document/getimagelist", 0 },
                    { 161227168235591L, null, null, null, "", true, "post", false, "上传文档图片", null, null, null, null, 161227167723592L, "/api/admin/document/uploadimage", 0 },
                    { 161227168235590L, null, null, null, "", true, "put", false, "修改文档内容", null, null, null, null, 161227167723592L, "/api/admin/document/updatecontent", 0 },
                    { 161227168235589L, null, null, null, "", true, "get", false, "查询单条文档内容", null, null, null, null, 161227167723592L, "/api/admin/document/getcontent", 0 },
                    { 161227168231494L, null, null, null, "", true, "delete", false, "删除文档", null, null, null, null, 161227167723592L, "/api/admin/document/softdelete", 0 },
                    { 161227168231493L, null, null, null, "", true, "put", false, "修改菜单", null, null, null, null, 161227167723592L, "/api/admin/document/updatemenu", 0 },
                    { 161227168227398L, null, null, null, "", true, "put", false, "修改分组", null, null, null, null, 161227167723592L, "/api/admin/document/updategroup", 0 },
                    { 161227168251973L, null, null, null, "", true, "put", false, "批量删除租户", null, null, null, null, 161227167723593L, "/api/admin/tenant/batchsoftdelete", 0 },
                    { 161227168227397L, null, null, null, "", true, "post", false, "新增菜单", null, null, null, null, 161227167723592L, "/api/admin/document/addmenu", 0 },
                    { 161227168223301L, null, null, null, "", true, "get", false, "查询精简文档列表", null, null, null, null, 161227167723592L, "/api/admin/document/getplainlist", 0 },
                    { 161227168219206L, null, null, null, "", true, "get", false, "查询单条菜单", null, null, null, null, 161227167723592L, "/api/admin/document/getmenu", 0 },
                    { 161227168219205L, null, null, null, "", true, "get", false, "查询单条分组", null, null, null, null, 161227167723592L, "/api/admin/document/getgroup", 0 },
                    { 161227168215111L, null, null, null, "", true, "get", false, "查询文档列表", null, null, null, null, 161227167723592L, "/api/admin/document/getlist", 0 },
                    { 161227168215110L, null, null, null, "", true, "post", false, "查询分页操作日志", null, null, null, null, 161227167723591L, "/api/admin/oprationlog/getpage", 0 },
                    { 161227168215109L, null, null, null, "", true, "post", false, "查询分页登录日志", null, null, null, null, 161227167723590L, "/api/admin/loginlog/getpage", 0 },
                    { 161227168211014L, null, null, null, "", true, "delete", false, "清除缓存", null, null, null, null, 161227167723589L, "/api/admin/cache/clear", 0 },
                    { 161227168211013L, null, null, null, "", true, "get", false, "获取缓存列表", null, null, null, null, 161227167723589L, "/api/admin/cache/list", 0 },
                    { 161227168206919L, null, null, null, "支持新增和修改视图\r\n根据视图是否存在自动禁用和启用视图", true, "post", false, "同步视图", null, null, null, null, 161227167719498L, "/api/admin/view/sync", 0 },
                    { 161227168206918L, null, null, null, "", true, "put", false, "批量删除视图", null, null, null, null, 161227167719498L, "/api/admin/view/batchsoftdelete", 0 },
                    { 161227168206917L, null, null, null, "", true, "delete", false, "删除视图", null, null, null, null, 161227167719498L, "/api/admin/view/softdelete", 0 },
                    { 161227168202823L, null, null, null, "", true, "put", false, "修改视图", null, null, null, null, 161227167719498L, "/api/admin/view/update", 0 },
                    { 161227168202822L, null, null, null, "", true, "post", false, "新增视图", null, null, null, null, 161227167719498L, "/api/admin/view/add", 0 },
                    { 161227168223302L, null, null, null, "", true, "post", false, "新增分组", null, null, null, null, 161227167723592L, "/api/admin/document/addgroup", 0 },
                    { 163579785756741L, null, null, null, "", true, "delete", false, "彻底删除租户", null, null, null, null, 161227167723593L, "/api/admin/tenant/delete", 0 },
                    { 170317848645701L, null, null, null, "", true, "get", false, "查询租户权限", null, null, null, null, 161227167719495L, "/api/admin/permission/gettenantpermissionlist", 0 },
                    { 170317848662085L, null, null, null, "", true, "post", false, "保存租户权限", null, null, null, null, 161227167719495L, "/api/admin/permission/savetenantpermissions", 0 },
                    { 189095453691973L, null, null, null, "", true, "get", false, "查询下拉数据", null, null, null, null, 161227167719497L, "/api/admin/user/getselect", 0 },
                    { 188049296683077L, null, null, null, "", true, "post", false, "查询组织架构列表", null, null, null, null, 174219034718277L, "/api/personnel/organization/getlist", 0 },
                    { 187384805367877L, null, null, null, "", true, "delete", false, "彻底删除权限", null, null, null, null, 161227167719495L, "/api/admin/permission/delete", 0 },
                    { 184100551532613L, null, null, null, "", true, "put", false, "批量删除数据字典类型", null, null, null, null, 174219034718279L, "/api/admin/dictionarytype/batchsoftdelete", 0 },
                    { 184100551516229L, null, null, null, "", true, "put", false, "批量删除数据字典", null, null, null, null, 161227167719494L, "/api/admin/dictionary/batchsoftdelete", 0 },
                    { 174219034738764L, null, null, null, "", true, "put", false, "批量删除职位", null, null, null, null, 174219034718278L, "/api/personnel/position/batchsoftdelete", 0 },
                    { 174219034738762L, null, null, null, "", true, "put", false, "修改职位", null, null, null, null, 174219034718278L, "/api/personnel/position/update", 0 },
                    { 174219034738761L, null, null, null, "", true, "post", false, "新增职位", null, null, null, null, 174219034718278L, "/api/personnel/position/add", 0 },
                    { 174219034738760L, null, null, null, "", true, "post", false, "查询分页职位", null, null, null, null, 174219034718278L, "/api/personnel/position/getpage", 0 }
                });

            migrationBuilder.InsertData(
                table: "Apis",
                columns: new[] { "Id", "CreatedTime", "CreatedUserId", "CreatedUserName", "Description", "Enabled", "HttpMethods", "IsDeleted", "Label", "ModifiedTime", "ModifiedUserId", "ModifiedUserName", "Name", "ParentId", "Path", "Sort" },
                values: new object[,]
                {
                    { 174219034738759L, null, null, null, "", true, "get", false, "查询单条职位", null, null, null, null, 174219034718278L, "/api/personnel/position/get", 0 },
                    { 174219034738758L, null, null, null, "", true, "delete", false, "删除组织架构", null, null, null, null, 174219034718277L, "/api/personnel/organization/softdelete", 0 },
                    { 174219034738757L, null, null, null, "", true, "put", false, "修改组织架构", null, null, null, null, 174219034718277L, "/api/personnel/organization/update", 0 },
                    { 174219034734674L, null, null, null, "", true, "post", false, "新增组织架构", null, null, null, null, 174219034718277L, "/api/personnel/organization/add", 0 },
                    { 174219034734672L, null, null, null, "", true, "get", false, "查询单条组织架构", null, null, null, null, 174219034718277L, "/api/personnel/organization/get", 0 },
                    { 174219034734671L, null, null, null, "", true, "put", false, "批量删除员工", null, null, null, null, 174219034701893L, "/api/personnel/employee/batchsoftdelete", 0 },
                    { 174219034734670L, null, null, null, "", true, "delete", false, "删除员工", null, null, null, null, 174219034701893L, "/api/personnel/employee/softdelete", 0 },
                    { 174219034734669L, null, null, null, "", true, "put", false, "修改员工", null, null, null, null, 174219034701893L, "/api/personnel/employee/update", 0 },
                    { 174219034734668L, null, null, null, "", true, "post", false, "新增员工", null, null, null, null, 174219034701893L, "/api/personnel/employee/add", 0 },
                    { 174219034734667L, null, null, null, "", true, "post", false, "查询分页员工", null, null, null, null, 174219034701893L, "/api/personnel/employee/getpage", 0 },
                    { 174219034734666L, null, null, null, "", true, "get", false, "查询单条员工", null, null, null, null, 174219034701893L, "/api/personnel/employee/get", 0 },
                    { 174219034734665L, null, null, null, "", true, "delete", false, "删除数据字典类型", null, null, null, null, 174219034718279L, "/api/admin/dictionarytype/softdelete", 0 },
                    { 174219034734664L, null, null, null, "", true, "put", false, "修改数据字典类型", null, null, null, null, 174219034718279L, "/api/admin/dictionarytype/update", 0 },
                    { 174219034734663L, null, null, null, "", true, "post", false, "新增数据字典类型", null, null, null, null, 174219034718279L, "/api/admin/dictionarytype/add", 0 },
                    { 174219034734662L, null, null, null, "", true, "post", false, "查询分页数据字典类型", null, null, null, null, 174219034718279L, "/api/admin/dictionarytype/getpage", 0 },
                    { 174219034734661L, null, null, null, "", true, "get", false, "查询单条数据字典类型", null, null, null, null, 174219034718279L, "/api/admin/dictionarytype/get", 0 },
                    { 174219034718279L, null, null, null, "", true, null, false, "数据字典类型", null, null, null, null, 0L, "dictionarytype", 0 },
                    { 174219034718278L, null, null, null, "", true, null, false, "职位管理", null, null, null, null, 0L, "position", 0 },
                    { 174219034718277L, null, null, null, "", true, null, false, "组织架构", null, null, null, null, 0L, "organization", 0 },
                    { 174219034701893L, null, null, null, "", true, null, false, "员工管理", null, null, null, null, 0L, "employee", 0 },
                    { 161227168202821L, null, null, null, "", true, "post", false, "查询分页视图", null, null, null, null, 161227167719498L, "/api/admin/view/getpage", 0 },
                    { 161227168198726L, null, null, null, "", true, "get", false, "查询全部视图", null, null, null, null, 161227167719498L, "/api/admin/view/getlist", 0 },
                    { 174219034738763L, null, null, null, "", true, "delete", false, "删除职位", null, null, null, null, 174219034718278L, "/api/personnel/position/softdelete", 0 },
                    { 161227168194631L, null, null, null, "", true, "post", false, "上传头像", null, null, null, null, 161227167719497L, "/api/admin/user/avatarupload", 0 },
                    { 161227168141381L, null, null, null, "", true, "put", false, "修改数据字典", null, null, null, null, 161227167719494L, "/api/admin/dictionary/update", 0 },
                    { 161227168137287L, null, null, null, "", true, "post", false, "新增数据字典", null, null, null, null, 161227167719494L, "/api/admin/dictionary/add", 0 },
                    { 161227168137286L, null, null, null, "", true, "post", false, "查询分页数据字典", null, null, null, null, 161227167719494L, "/api/admin/dictionary/getpage", 0 },
                    { 161227168137285L, null, null, null, "", true, "get", false, "查询单条数据字典", null, null, null, null, 161227167719494L, "/api/admin/dictionary/get", 0 },
                    { 161227168133190L, null, null, null, "以旧换新", true, "get", false, "刷新Token", null, null, null, null, 161227167719493L, "/api/admin/auth/refresh", 0 },
                    { 161227168133189L, null, null, null, "根据登录信息生成Token", true, "post", false, "用户登录", null, null, null, null, 161227167719493L, "/api/admin/auth/login", 0 },
                    { 161227168129095L, null, null, null, "", true, "get", false, "查询用户信息", null, null, null, null, 161227167719493L, "/api/admin/auth/getuserinfo", 0 },
                    { 161227168129094L, null, null, null, "", true, "get", false, "获取密钥", null, null, null, null, 161227167719493L, "/api/admin/auth/getpasswordencryptkey", 0 },
                    { 161227168129093L, null, null, null, "", true, "get", false, "获取验证码", null, null, null, null, 161227167719493L, "/api/admin/auth/getverifycode", 0 },
                    { 161227168124998L, null, null, null, "支持新增和修改接口\r\n根据接口是否存在自动禁用和启用api", true, "post", false, "同步接口", null, null, null, null, 161227167658053L, "/api/admin/api/sync", 0 },
                    { 161227168124997L, null, null, null, "", true, "put", false, "批量删除接口", null, null, null, null, 161227167658053L, "/api/admin/api/batchsoftdelete", 0 },
                    { 161227168120903L, null, null, null, "", true, "delete", false, "删除接口", null, null, null, null, 161227167658053L, "/api/admin/api/softdelete", 0 },
                    { 161227168120902L, null, null, null, "", true, "put", false, "修改接口", null, null, null, null, 161227167658053L, "/api/admin/api/update", 0 },
                    { 161227168141382L, null, null, null, "", true, "delete", false, "删除数据字典", null, null, null, null, 161227167719494L, "/api/admin/dictionary/softdelete", 0 },
                    { 161227168120901L, null, null, null, "", true, "post", false, "新增接口", null, null, null, null, 161227167658053L, "/api/admin/api/add", 0 },
                    { 161227168116805L, null, null, null, "", true, "get", false, "查询全部接口", null, null, null, null, 161227167658053L, "/api/admin/api/getlist", 0 },
                    { 161227168079941L, null, null, null, "", true, "get", false, "查询单条接口", null, null, null, null, 161227167658053L, "/api/admin/api/get", 0 },
                    { 161227167723593L, null, null, null, "", true, null, false, "租户管理", null, null, null, null, 0L, "tenant", 0 }
                });

            migrationBuilder.InsertData(
                table: "Apis",
                columns: new[] { "Id", "CreatedTime", "CreatedUserId", "CreatedUserName", "Description", "Enabled", "HttpMethods", "IsDeleted", "Label", "ModifiedTime", "ModifiedUserId", "ModifiedUserName", "Name", "ParentId", "Path", "Sort" },
                values: new object[,]
                {
                    { 161227167723592L, null, null, null, "", true, null, false, "文档管理", null, null, null, null, 0L, "document", 0 },
                    { 161227167723590L, null, null, null, "", true, null, false, "登录日志管理", null, null, null, null, 0L, "loginlog", 0 },
                    { 161227167723589L, null, null, null, "", true, null, false, "缓存管理", null, null, null, null, 0L, "cache", 0 },
                    { 161227167719498L, null, null, null, "", true, null, false, "视图管理", null, null, null, null, 0L, "view", 0 },
                    { 161227167719497L, null, null, null, "", true, null, false, "用户管理", null, null, null, null, 0L, "user", 0 },
                    { 161227167719496L, null, null, null, "", true, null, false, "角色管理", null, null, null, null, 0L, "role", 0 },
                    { 161227167719495L, null, null, null, "", true, null, false, "权限管理", null, null, null, null, 0L, "permission", 0 },
                    { 161227167719494L, null, null, null, "", true, null, false, "数据字典", null, null, null, null, 0L, "dictionary", 0 },
                    { 161227167719493L, null, null, null, "", true, null, false, "授权管理", null, null, null, null, 0L, "auth", 0 },
                    { 161227168198725L, null, null, null, "", true, "get", false, "查询单条视图", null, null, null, null, 161227167719498L, "/api/admin/view/get", 0 },
                    { 161227168116806L, null, null, null, "", true, "post", false, "查询分页接口", null, null, null, null, 161227167658053L, "/api/admin/api/getpage", 0 },
                    { 161227168141383L, null, null, null, "", true, "get", false, "查询权限列表", null, null, null, null, 161227167719495L, "/api/admin/permission/getlist", 0 },
                    { 161227167723591L, null, null, null, "", true, null, false, "操作日志管理", null, null, null, null, 0L, "oprationlog", 0 },
                    { 161227168145478L, null, null, null, "", true, "get", false, "查询单条菜单", null, null, null, null, 161227167719495L, "/api/admin/permission/getmenu", 0 },
                    { 161227168194630L, null, null, null, "", true, "put", false, "更新用户基本信息", null, null, null, null, 161227167719497L, "/api/admin/user/updatebasic", 0 },
                    { 161227168145477L, null, null, null, "", true, "get", false, "查询单条分组", null, null, null, null, 161227167719495L, "/api/admin/permission/getgroup", 0 },
                    { 161227168194629L, null, null, null, "", true, "put", false, "更新用户密码", null, null, null, null, 161227167719497L, "/api/admin/user/changepassword", 0 },
                    { 161227168190535L, null, null, null, "", true, "put", false, "批量删除用户", null, null, null, null, 161227167719497L, "/api/admin/user/batchsoftdelete", 0 },
                    { 161227168190534L, null, null, null, "", true, "delete", false, "删除用户", null, null, null, null, 161227167719497L, "/api/admin/user/softdelete", 0 },
                    { 161227168190533L, null, null, null, "", true, "put", false, "修改用户", null, null, null, null, 161227167719497L, "/api/admin/user/update", 0 },
                    { 161227168186438L, null, null, null, "", true, "post", false, "新增用户", null, null, null, null, 161227167719497L, "/api/admin/user/add", 0 },
                    { 161227168182343L, null, null, null, "", true, "get", false, "查询单条用户", null, null, null, null, 161227167719497L, "/api/admin/user/get", 0 },
                    { 161227168182342L, null, null, null, "", true, "get", false, "查询用户基本信息", null, null, null, null, 161227167719497L, "/api/admin/user/getbasic", 0 },
                    { 161227168182341L, null, null, null, "", true, "put", false, "批量删除角色", null, null, null, null, 161227167719496L, "/api/admin/role/batchsoftdelete", 0 },
                    { 161227168178246L, null, null, null, "", true, "delete", false, "删除角色", null, null, null, null, 161227167719496L, "/api/admin/role/softdelete", 0 },
                    { 161227168178245L, null, null, null, "", true, "put", false, "修改角色", null, null, null, null, 161227167719496L, "/api/admin/role/update", 0 },
                    { 161227168174149L, null, null, null, "", true, "post", false, "新增角色", null, null, null, null, 161227167719496L, "/api/admin/role/add", 0 },
                    { 161227168170055L, null, null, null, "", true, "post", false, "查询分页角色", null, null, null, null, 161227167719496L, "/api/admin/role/getpage", 0 },
                    { 161227168186437L, null, null, null, "", true, "post", false, "查询分页用户", null, null, null, null, 161227167719497L, "/api/admin/user/getpage", 0 },
                    { 161227168170053L, null, null, null, "", true, "put", false, "修改权限点", null, null, null, null, 161227167719495L, "/api/admin/permission/updatedot", 0 },
                    { 161227168149574L, null, null, null, "", true, "get", false, "查询角色权限-权限列表", null, null, null, null, 161227167719495L, "/api/admin/permission/getpermissionlist", 0 },
                    { 161227168170054L, null, null, null, "", true, "get", false, "查询单条角色", null, null, null, null, 161227167719496L, "/api/admin/role/get", 0 },
                    { 161227168149575L, null, null, null, "", true, "get", false, "查询角色权限", null, null, null, null, 161227167719495L, "/api/admin/permission/getrolepermissionlist", 0 },
                    { 161227168153669L, null, null, null, "", true, "post", false, "新增分组", null, null, null, null, 161227167719495L, "/api/admin/permission/addgroup", 0 },
                    { 161227168153670L, null, null, null, "", true, "post", false, "新增菜单", null, null, null, null, 161227167719495L, "/api/admin/permission/addmenu", 0 },
                    { 161227168157765L, null, null, null, "", true, "put", false, "修改分组", null, null, null, null, 161227167719495L, "/api/admin/permission/updategroup", 0 },
                    { 161227168149573L, null, null, null, "", true, "get", false, "查询单条接口", null, null, null, null, 161227167719495L, "/api/admin/permission/getapi", 0 },
                    { 161227168153671L, null, null, null, "", true, "post", false, "新增接口", null, null, null, null, 161227167719495L, "/api/admin/permission/addapi", 0 },
                    { 161227168157766L, null, null, null, "", true, "put", false, "修改菜单", null, null, null, null, 161227167719495L, "/api/admin/permission/updatemenu", 0 },
                    { 161227168161861L, null, null, null, "", true, "put", false, "修改接口", null, null, null, null, 161227167719495L, "/api/admin/permission/updateapi", 0 },
                    { 161227168161862L, null, null, null, "", true, "delete", false, "删除权限", null, null, null, null, 161227167719495L, "/api/admin/permission/softdelete", 0 },
                    { 161227168165957L, null, null, null, "", true, "post", false, "保存角色权限", null, null, null, null, 161227167719495L, "/api/admin/permission/assign", 0 }
                });

            migrationBuilder.InsertData(
                table: "Apis",
                columns: new[] { "Id", "CreatedTime", "CreatedUserId", "CreatedUserName", "Description", "Enabled", "HttpMethods", "IsDeleted", "Label", "ModifiedTime", "ModifiedUserId", "ModifiedUserName", "Name", "ParentId", "Path", "Sort" },
                values: new object[,]
                {
                    { 161227168165958L, null, null, null, "", true, "get", false, "查询单条权限点", null, null, null, null, 161227167719495L, "/api/admin/permission/getdot", 0 },
                    { 161227168165959L, null, null, null, "", true, "post", false, "新增权限点", null, null, null, null, 161227167719495L, "/api/admin/permission/adddot", 0 }
                });

            migrationBuilder.InsertData(
                table: "DictionariesTypes",
                columns: new[] { "Id", "Code", "CreatedTime", "CreatedUserId", "CreatedUserName", "Description", "Enabled", "IsDeleted", "ModifiedTime", "ModifiedUserId", "ModifiedUserName", "Name", "Sort" },
                values: new object[] { 187395320434757L, "sex", null, null, null, "", true, false, null, null, null, "性别", 0 });

            migrationBuilder.InsertData(
                table: "Permissions",
                columns: new[] { "Id", "Closable", "Code", "CreatedTime", "CreatedUserId", "CreatedUserName", "Description", "Enabled", "External", "Hidden", "Icon", "IsDeleted", "Label", "ModifiedTime", "ModifiedUserId", "ModifiedUserName", "NewWindow", "Opened", "ParentId", "Path", "PermissionEntityId", "Sort", "Type", "ViewId" },
                values: new object[,]
                {
                    { 161227168698437L, null, "api:admin:view:sync", null, null, null, "", true, null, false, null, false, "同步", null, null, null, null, null, 161227168686149L, null, null, 6, 3, null },
                    { 161227168714821L, null, "api:admin:permission:updatemenu", null, null, null, "", true, null, false, null, false, "修改菜单", null, null, null, null, null, 161227168702533L, null, null, 6, 3, null },
                    { 161227168710725L, null, "api:admin:permission:addapi", null, null, null, "", true, null, false, null, false, "新增接口", null, null, null, null, null, 161227168702533L, null, null, 4, 3, null },
                    { 161227168706630L, null, "api:admin:permission:addmenu", null, null, null, "", true, null, false, null, false, "新增菜单", null, null, null, null, null, 161227168702533L, null, null, 3, 3, null },
                    { 161227168706629L, null, "api:admin:permission:addgroup", null, null, null, "", true, null, false, null, false, "新增分组", null, null, null, null, null, 161227168702533L, null, null, 2, 3, null },
                    { 161227168702534L, null, "api:admin:permission:getlist", null, null, null, "", true, null, false, "", false, "查询", null, null, null, null, null, 161227168702533L, "", null, 1, 3, null },
                    { 161227168710726L, null, "api:admin:permission:updategroup", null, null, null, "", true, null, false, null, false, "修改分组", null, null, null, null, null, 161227168702533L, null, null, 5, 3, null },
                    { 161227168694342L, null, "api:admin:view:batchsoftdelete", null, null, null, "", true, null, false, null, false, "批量删除", null, null, null, null, null, 161227168686149L, null, null, 5, 3, null },
                    { 161227168677957L, false, "api:admin:api:softdelete", null, null, null, "", true, null, false, null, false, "删除", null, null, null, null, false, 161227168669765L, " ", null, 4, 3, null },
                    { 161227168690246L, null, "api:admin:view:update", null, null, null, "", true, null, false, null, false, "修改", null, null, null, null, null, 161227168686149L, null, null, 3, 3, null },
                    { 161227168690245L, null, "api:admin:view:add", null, null, null, "", true, null, false, null, false, "新增", null, null, null, null, null, 161227168686149L, null, null, 2, 3, null },
                    { 161227168686150L, null, "api:admin:view:getlist", null, null, null, "", true, null, false, null, false, "查询", null, null, null, null, null, 161227168686149L, null, null, 1, 3, null },
                    { 161227168682053L, null, "api:admin:api:sync", null, null, null, "", true, null, false, "", false, "同步", null, null, null, null, null, 161227168669765L, "", null, 6, 3, null },
                    { 161227168677958L, null, "api:admin:api:batchsoftdelete", null, null, null, "", true, null, false, "", false, "批量删除", null, null, null, null, null, 161227168669765L, "", null, 5, 3, null },
                    { 161227168673862L, false, "api:admin:api:update", null, null, null, "", true, null, false, null, false, "修改", null, null, null, null, false, 161227168669765L, " ", null, 3, 3, null },
                    { 161227168714822L, null, "api:admin:permission:updateapi", null, null, null, "", true, null, false, null, false, "修改接口", null, null, null, null, null, 161227168702533L, null, null, 7, 3, null },
                    { 161227168673861L, false, "api:admin:api:add", null, null, null, "", true, null, false, null, false, "新增", null, null, null, null, false, 161227168669765L, " ", null, 2, 3, null },
                    { 161227168669766L, null, "api:admin:api:getlist", null, null, null, "", true, null, false, "", false, "查询", null, null, null, null, null, 161227168669765L, "", null, 1, 3, null },
                    { 161227168694341L, null, "api:admin:view:softdelete", null, null, null, "", true, null, false, null, false, "删除", null, null, null, null, null, 161227168686149L, null, null, 4, 3, null },
                    { 161227168718917L, false, "api:admin:permission:softdelete", null, null, null, "", true, null, false, null, false, "删除", null, null, null, null, false, 161227168702533L, " ", null, 8, 3, null },
                    { 187375358951493L, null, "api:admin:dictionary:getpage", null, null, null, "", true, null, false, null, false, "查询", null, null, null, null, null, 187055743545413L, null, null, 1, 3, null },
                    { 161227168731205L, null, "api:admin:permission:updatedot", null, null, null, "", true, null, false, null, false, "修改权限点", null, null, null, null, null, 161227168702533L, null, null, 0, 3, null },
                    { 161227168665669L, false, "api:admin:role:batchsoftdelete", null, null, null, "", true, null, false, "", false, "批量删除", null, null, null, null, false, 161227168653381L, " ", null, 5, 3, null },
                    { 161227168788550L, null, "api:admin:oprationlog:getpage", null, null, null, "", true, null, false, null, false, "查询", null, null, null, null, null, 161227168788549L, null, null, 1, 3, null },
                    { 161227168784454L, null, "api:admin:loginlog:getpage", null, null, null, "", true, null, false, null, false, "查询", null, null, null, null, null, 161227168784453L, null, null, 1, 3, null },
                    { 187391980761157L, null, "api:admin:dictionary:add", null, null, null, "", true, null, false, null, false, "新增", null, null, null, null, null, 187055743545413L, null, null, 2, 3, null },
                    { 187391371018309L, null, "api:admin:dictionary:batchsoftdelete", null, null, null, "", true, null, false, null, false, "批量删除", null, null, null, null, null, 187055743545413L, null, null, 5, 3, null },
                    { 187390547820613L, null, "api:admin:dictionary:softdelete", null, null, null, "", true, null, false, null, false, "删除", null, null, null, null, null, 187055743545413L, null, null, 4, 3, null },
                    { 187389970825285L, null, "api:admin:dictionary:update", null, null, null, "", true, null, false, null, false, "修改", null, null, null, null, null, 187055743545413L, null, null, 3, 3, null },
                    { 163579955331141L, null, "api:admin:tenant:delete", null, null, null, "", true, null, false, null, false, "彻底删除", null, null, null, null, null, 161227168751685L, null, null, 8, 3, null },
                    { 161807358345285L, null, "api:admin:permission:savetenantpermissions", null, null, null, "", true, null, false, null, false, "设置权限", null, null, null, null, null, 161227168751685L, null, null, 7, 3, null },
                    { 161227168759878L, null, "api:admin:tenant:batchsoftdelete", null, null, null, "", true, null, false, null, false, "批量删除", null, null, null, null, null, 161227168751685L, null, null, 5, 3, null },
                    { 161227168759877L, null, "api:admin:tenant:softdelete", null, null, null, "", true, null, false, null, false, "删除", null, null, null, null, null, 161227168751685L, null, null, 4, 3, null },
                    { 161227168755782L, null, "api:admin:tenant:update", null, null, null, "", true, null, false, null, false, "修改", null, null, null, null, null, 161227168751685L, null, null, 3, 3, null },
                    { 161227168755781L, null, "api:admin:tenant:add", null, null, null, "", true, null, false, null, false, "新增", null, null, null, null, null, 161227168751685L, null, null, 2, 3, null },
                    { 161227168751686L, null, "api:admin:tenant:getpage", null, null, null, "", true, null, false, null, false, "查询", null, null, null, null, null, 161227168751685L, null, null, 1, 3, null },
                    { 161227168747590L, null, "api:admin:cache:clear", null, null, null, "", true, null, false, null, false, "清除缓存", null, null, null, null, null, 161227168743493L, null, null, 2, 3, null },
                    { 161227168747589L, null, "api:admin:cache:list", null, null, null, "", true, null, false, null, false, "查询", null, null, null, null, null, 161227168743493L, null, null, 1, 3, null },
                    { 161227168739398L, false, "api:admin:permission:assign", null, null, null, "", true, null, false, null, false, "保存", null, null, null, null, false, 161227168731206L, " ", null, 4, 3, null }
                });

            migrationBuilder.InsertData(
                table: "Permissions",
                columns: new[] { "Id", "Closable", "Code", "CreatedTime", "CreatedUserId", "CreatedUserName", "Description", "Enabled", "External", "Hidden", "Icon", "IsDeleted", "Label", "ModifiedTime", "ModifiedUserId", "ModifiedUserName", "NewWindow", "Opened", "ParentId", "Path", "PermissionEntityId", "Sort", "Type", "ViewId" },
                values: new object[,]
                {
                    { 161227168735301L, null, "api:admin:role-permisson:list", null, null, null, "", true, null, false, "", false, "查询", null, null, null, null, null, 161227168731206L, "", null, 1, 3, null },
                    { 187385577599045L, null, "api:admin:permission:delete", null, null, null, "", true, null, false, null, false, "彻底删除", null, null, null, null, null, 161227168702533L, null, null, 7, 3, null },
                    { 161227168727110L, null, "api:admin:permission:adddot", null, null, null, "", true, null, false, null, false, "新增权限点", null, null, null, null, null, 161227168702533L, null, null, 0, 3, null },
                    { 161227168661573L, true, "api:admin:role:softdelete", null, null, null, "", true, null, false, null, false, "删除", null, null, null, null, false, 161227168653381L, " ", null, 4, 3, null },
                    { 188054776545349L, null, "api:personnel:position:update", null, null, null, "", true, null, false, null, false, "修改", null, null, null, null, null, 188050115035205L, null, null, 0, 3, null },
                    { 161227168657477L, false, "api:admin:role:add", null, null, null, "", true, null, false, null, false, "新增", null, null, null, null, false, 161227168653381L, " ", null, 2, 3, null },
                    { 161227168821318L, null, "api:admin:document:getlist", null, null, null, "", true, null, false, null, false, "查询文档", null, null, null, null, null, 161227168796741L, null, null, 1, 3, null },
                    { 161227168813126L, null, "api:admin:document:softdelete", null, null, null, "", true, null, false, null, false, "删除文档", null, null, null, null, null, 161227168796741L, null, null, 9, 3, null },
                    { 161227168813125L, null, "api:admin:document:updatemenu", null, null, null, "", true, null, false, null, false, "修改菜单", null, null, null, null, null, 161227168796741L, null, null, 8, 3, null },
                    { 161227168809029L, null, "api:admin:document:updategroup", null, null, null, "", true, null, false, null, false, "修改分组", null, null, null, null, null, 161227168796741L, null, null, 7, 3, null },
                    { 161227168804933L, null, "api:admin:document:addmenu", null, null, null, "", true, null, false, null, false, "新增菜单", null, null, null, null, null, 161227168796741L, null, null, 6, 3, null },
                    { 161227168800838L, null, "api:admin:document:addgroup", null, null, null, "", true, null, false, null, false, "新增分组", null, null, null, null, null, 161227168796741L, null, null, 5, 3, null },
                    { 161227168632901L, false, "api:admin:user:changepassword", null, null, null, "", true, null, false, "", false, "更新密码", null, null, null, null, false, 161227168624709L, " ", null, 3, 3, null },
                    { 161227168628806L, null, "api:admin:user:updatebasic", null, null, null, "", true, null, false, null, false, "更新基本信息", null, null, null, null, null, 161227168624709L, null, null, 2, 3, null },
                    { 161227168825414L, null, "api:admin:document:updatecontent", null, null, null, "", true, null, false, null, false, "修改文档", null, null, null, null, null, 161227168796741L, null, null, 11, 3, null },
                    { 161227168628805L, false, "api:admin:user:getbasic", null, null, null, "", true, null, false, "", false, "查询基本信息", null, null, null, null, false, 161227168624709L, "", null, 1, 3, null },
                    { 161227168657478L, false, "api:admin:role:update", null, null, null, "", true, null, false, null, false, "修改", null, null, null, null, false, 161227168653381L, " ", null, 3, 3, null },
                    { 161227168780358L, null, null, null, null, null, null, true, null, false, "el-icon-notebook-2", false, "日志管理", null, null, null, null, false, 161227168497733L, null, null, 4, 1, null },
                    { 161227168763974L, false, null, null, null, null, "", true, null, false, "el-icon-s-platform", false, "系统配置", null, null, null, null, true, 161227168497733L, "", null, 3, 1, null },
                    { 161227168636997L, false, null, null, null, null, "", true, null, false, "fa fa-sitemap", false, "权限管理", null, null, null, null, true, 161227168497733L, "", null, 2, 1, null },
                    { 188049591447621L, null, null, null, null, null, null, true, null, false, "el-icon-user-solid", false, "人事管理", null, null, null, null, true, 0L, null, null, 1, 1, null },
                    { 161227168497734L, null, null, null, null, null, null, true, null, false, "el-icon-question", false, "帮助文档", null, null, null, null, true, 0L, null, null, 4, 1, null },
                    { 161227168497733L, null, null, null, null, null, null, true, null, false, "el-icon-s-platform", false, "平台管理", null, null, null, null, true, 0L, null, null, 2, 1, null },
                    { 161227168464965L, false, null, null, null, null, "", true, null, false, "el-icon-s-custom", false, "个人管理", null, null, null, null, true, 0L, "", null, 3, 1, null },
                    { 161227168792646L, false, null, null, null, null, "", true, false, false, "el-icon-s-promotion", false, "FreeSql", null, null, null, false, null, 161227168497734L, "http://freesql.net/guide", null, 6, 2, null },
                    { 161227168829509L, null, "api:admin:document:uploadimage", null, null, null, "", true, null, false, null, false, "上传图片", null, null, null, null, null, 161227168796741L, null, null, 14, 3, null },
                    { 161227168792645L, false, null, null, null, null, "", true, false, false, "el-icon-s-promotion", false, "Admin", null, null, null, false, null, 161227168497734L, "https://zhontai.net", null, 5, 2, null },
                    { 161227168833606L, null, "api:admin:document:deleteimage", null, null, null, "", true, null, false, null, false, "删除图片", null, null, null, null, null, 161227168796741L, null, null, 13, 3, null },
                    { 161227168653382L, false, "api:admin:role:getpage", null, null, null, "", true, null, false, null, false, "查询", null, null, null, null, false, 161227168653381L, " ", null, 1, 3, null },
                    { 161227168649285L, null, "api:admin:user:batchsoftdelete", null, null, null, "", true, null, false, "", false, "批量删除", null, null, null, null, null, 161227168636998L, "", null, 5, 3, null },
                    { 161227168645190L, true, "api:admin:user:softdelete", null, null, null, "", true, null, false, null, false, "删除", null, null, null, null, false, 161227168636998L, "", null, 4, 3, null },
                    { 161227168645189L, true, "api:admin:user:update", null, null, null, "", true, null, false, null, false, "修改", null, null, null, null, false, 161227168636998L, "", null, 3, 3, null },
                    { 161227168641094L, false, "api:admin:user:add", null, null, null, "", true, null, false, null, false, "新增", null, null, null, null, false, 161227168636998L, "", null, 2, 3, null },
                    { 161227168641093L, true, "api:admin:user:getpage", null, null, null, "", true, null, false, null, false, "查询", null, null, null, null, false, 161227168636998L, "", null, 1, 3, null },
                    { 188799997452357L, null, "api:personnel:employee:batchsoftdelete", null, null, null, "", true, null, false, null, false, "批量删除", null, null, null, null, null, 188799375847493L, null, null, 0, 3, null },
                    { 188799949844549L, null, "api:personnel:employee:softdelete", null, null, null, "", true, null, false, null, false, "删除", null, null, null, null, null, 188799375847493L, null, null, 0, 3, null },
                    { 188799795101765L, null, "api:personnel:employee:add", null, null, null, "", true, null, false, null, false, "新增", null, null, null, null, null, 188799375847493L, null, null, 0, 3, null },
                    { 188799878676549L, null, "api:personnel:employee:update", null, null, null, "", true, null, false, null, false, "修改", null, null, null, null, null, 188799375847493L, null, null, 0, 3, null },
                    { 188054509027397L, null, "api:personnel:organization:softdelete", null, null, null, "", true, null, false, null, false, "删除", null, null, null, null, null, 188053882503237L, null, null, 0, 3, null },
                    { 188054416891973L, null, "api:personnel:organization:update", null, null, null, "", true, null, false, null, false, "修改", null, null, null, null, null, 188053882503237L, null, null, 0, 3, null },
                    { 188054341582917L, null, "api:personnel:organization:add", null, null, null, "", true, null, false, null, false, "新增", null, null, null, null, null, 188053882503237L, null, null, 0, 3, null },
                    { 188054258278469L, null, "api:personnel:organization:getlist", null, null, null, "", true, null, false, null, false, "查询", null, null, null, null, null, 188053882503237L, null, null, 0, 3, null }
                });

            migrationBuilder.InsertData(
                table: "Permissions",
                columns: new[] { "Id", "Closable", "Code", "CreatedTime", "CreatedUserId", "CreatedUserName", "Description", "Enabled", "External", "Hidden", "Icon", "IsDeleted", "Label", "ModifiedTime", "ModifiedUserId", "ModifiedUserName", "NewWindow", "Opened", "ParentId", "Path", "PermissionEntityId", "Sort", "Type", "ViewId" },
                values: new object[,]
                {
                    { 189345990168645L, null, "api:personnel:position:batchsoftdelete", null, null, null, "", true, null, false, null, false, "批量删除", null, null, null, null, null, 188050115035205L, null, null, 0, 3, null },
                    { 188054834004037L, null, "api:personnel:position:softdelete", null, null, null, "", true, null, false, null, false, "删除", null, null, null, null, null, 188050115035205L, null, null, 0, 3, null },
                    { 188054719266885L, null, "api:personnel:position:add", null, null, null, "", true, null, false, null, false, "新增", null, null, null, null, null, 188050115035205L, null, null, 0, 3, null },
                    { 188054656589893L, null, "api:personnel:position:getpage", null, null, null, "", true, null, false, null, false, "查询", null, null, null, null, null, 188050115035205L, null, null, 0, 3, null },
                    { 188799732494405L, null, "api:personnel:employee:getpage", null, null, null, "", true, null, false, null, false, "查询", null, null, null, null, null, 188799375847493L, null, null, 0, 3, null },
                    { 161227168833605L, null, "api:admin:document:getimagelist", null, null, null, "", true, null, false, null, false, "查询图片", null, null, null, null, null, 161227168796741L, null, null, 12, 3, null }
                });

            migrationBuilder.InsertData(
                table: "Roles",
                columns: new[] { "Id", "Code", "CreatedTime", "CreatedUserId", "CreatedUserName", "Description", "Enabled", "IsDeleted", "ModifiedTime", "ModifiedUserId", "ModifiedUserName", "Name", "Sort" },
                values: new object[,]
                {
                    { 162605510979653L, "plat_user", null, null, null, "", true, false, null, null, null, "平台用户", 0 },
                    { 161223412080709L, "plat_admin", null, null, null, "", true, false, null, null, null, "平台管理员", 0 }
                });

            migrationBuilder.InsertData(
                table: "Users",
                columns: new[] { "Id", "Avatar", "CreatedTime", "CreatedUserId", "CreatedUserName", "IsDeleted", "ModifiedTime", "ModifiedUserId", "ModifiedUserName", "NickName", "Password", "Remark", "Status", "UserName" },
                values: new object[,]
                {
                    { 162605614280773L, null, null, null, null, false, null, null, null, "平台用户", "96E79218965EB72C92A549DD5A33112", null, 0, "user" },
                    { 161223411986501L, "", null, null, null, false, null, null, null, "平台管理员", "96E79218965EB72C92A549DD5A33112", "", 0, "admin" }
                });

            migrationBuilder.InsertData(
                table: "Views",
                columns: new[] { "Id", "Cache", "CreatedTime", "CreatedUserId", "CreatedUserName", "Description", "Enabled", "IsDeleted", "Label", "ModifiedTime", "ModifiedUserId", "ModifiedUserName", "Name", "ParentId", "Path", "Sort" },
                values: new object[,]
                {
                    { 161227168313413L, true, null, null, null, null, true, false, "平台管理", null, null, null, null, 0L, null, 0 },
                    { 161227168448583L, true, null, null, null, null, true, false, "租户管理", null, null, null, "Tenant", 161227168436294L, "admin/tenant", 0 },
                    { 161227168448582L, true, null, null, null, null, true, false, "缓存管理", null, null, null, "Cache", 161227168436294L, "admin/cache", 0 },
                    { 161227168448581L, true, null, null, null, null, true, false, "角色权限", null, null, null, "RolePermission", 161227168436294L, "admin/role-permission", 0 },
                    { 161227168444486L, true, null, null, null, null, true, false, "权限管理", null, null, null, "Permission", 161227168436294L, "admin/permission", 0 },
                    { 161227168444485L, true, null, null, null, null, true, false, "视图管理", null, null, null, "AdminView", 161227168436294L, "admin/view", 0 },
                    { 161227168440390L, true, null, null, null, null, true, false, "接口管理", null, null, null, "Api", 161227168436294L, "admin/api", 0 },
                    { 161227168440389L, true, null, null, null, null, true, false, "角色管理", null, null, null, "Role", 161227168436294L, "admin/role", 0 },
                    { 161227168436295L, true, null, null, null, null, true, false, "用户管理", null, null, null, "User", 161227168436294L, "admin/user", 0 },
                    { 161227168436293L, true, null, null, null, null, true, false, "个人设置", null, null, null, "Settins", 161227168432199L, "account/settings", 0 },
                    { 161227168452678L, true, null, null, null, null, true, false, "操作日志", null, null, null, "OprationLog", 161227168452677L, "admin/opration-log", 0 },
                    { 187053736300613L, true, null, null, null, "数据字典", true, false, "数据字典", null, null, null, "Dictionary", 161227168432197L, "admin/dictionary/index", 0 },
                    { 174312361132101L, true, null, null, null, "", true, false, "岗位管理", null, null, null, "Position", 174650149470277L, "personnel/position", 0 },
                    { 174312361087045L, true, null, null, null, "", true, false, "部门管理", null, null, null, "Organization", 174650149470277L, "personnel/organization", 0 },
                    { 161227168456774L, true, null, null, null, null, true, false, "文档管理", null, null, null, "Document", 161227168313413L, "admin/document", 0 },
                    { 161227168452677L, true, null, null, null, "", true, false, "日志管理", null, null, null, null, 161227168313413L, null, 0 },
                    { 161227168436294L, true, null, null, null, "", true, false, "权限管理", null, null, null, null, 161227168313413L, null, 0 },
                    { 161227168432199L, true, null, null, null, null, true, false, "个人管理", null, null, null, null, 161227168313413L, null, 0 },
                    { 161227168432197L, true, null, null, null, null, true, false, "系统配置", null, null, null, null, 161227168313413L, null, 0 },
                    { 161227168428101L, true, null, null, null, null, true, false, "首页", null, null, null, "Home", 161227168313413L, "admin/home", 0 },
                    { 174650149470277L, true, null, null, null, "", true, false, "人事管理", null, null, null, "", 0L, "", 0 },
                    { 188792508244037L, true, null, null, null, "", true, false, "员工管理", null, null, null, "Employee", 174650149470277L, "personnel/employee", 0 },
                    { 161227168456773L, true, null, null, null, null, true, false, "登录日志", null, null, null, "LoginLog", 161227168452677L, "admin/login-log", 0 }
                });

            migrationBuilder.InsertData(
                table: "Dictionaries",
                columns: new[] { "Id", "Code", "CreatedTime", "CreatedUserId", "CreatedUserName", "Description", "DictionaryTypeId", "Enabled", "IsDeleted", "ModifiedTime", "ModifiedUserId", "ModifiedUserName", "Name", "Sort", "Value" },
                values: new object[,]
                {
                    { 187395320303685L, "male", null, null, null, "", 187395320434757L, true, false, null, null, null, "男", 0, "1" },
                    { 187395320369221L, "female", null, null, null, "", 187395320434757L, true, false, null, null, null, "女", 0, "2" }
                });

            migrationBuilder.InsertData(
                table: "PermissionApis",
                columns: new[] { "Id", "ApiId", "CreatedTime", "CreatedUserId", "CreatedUserName", "PermissionId" },
                values: new object[,]
                {
                    { 171043491364938L, 161227168149575L, null, null, null, 161227168739398L },
                    { 171043491364937L, 161227168149574L, null, null, null, 161227168739398L },
                    { 171044150452298L, 161227168170055L, null, null, null, 161227168735301L },
                    { 171044150452297L, 161227168149575L, null, null, null, 161227168735301L },
                    { 171044150452296L, 161227168149574L, null, null, null, 161227168735301L },
                    { 187385577730117L, 187384805367877L, null, null, null, 187385577599045L },
                    { 171040714301512L, 161227168170053L, null, null, null, 161227168731205L },
                    { 171040714301511L, 161227168165958L, null, null, null, 161227168731205L },
                    { 171040863215686L, 161227168165959L, null, null, null, 161227168727110L },
                    { 171041229475910L, 161227168161862L, null, null, null, 161227168718917L },
                    { 171041379016774L, 161227168157766L, null, null, null, 161227168714821L },
                    { 171041379016773L, 161227168145478L, null, null, null, 161227168714821L },
                    { 171041490071624L, 161227168157765L, null, null, null, 161227168710726L },
                    { 171041490071623L, 161227168145477L, null, null, null, 161227168710726L },
                    { 171040981246021L, 161227168153670L, null, null, null, 161227168706630L },
                    { 171041051480134L, 161227168153669L, null, null, null, 161227168706629L },
                    { 171040930574406L, 161227168141383L, null, null, null, 161227168702534L },
                    { 171040379768902L, 161227168206919L, null, null, null, 161227168698437L },
                    { 171040295129157L, 161227168206917L, null, null, null, 161227168694341L },
                    { 171040256553032L, 161227168202823L, null, null, null, 161227168690246L },
                    { 171040256553031L, 161227168198725L, null, null, null, 161227168690246L },
                    { 171040219164742L, 161227168202822L, null, null, null, 161227168690245L },
                    { 171040178724934L, 161227168198726L, null, null, null, 161227168686150L },
                    { 171043491364939L, 161227168165957L, null, null, null, 161227168739398L },
                    { 171043491364940L, 161227168170055L, null, null, null, 161227168739398L },
                    { 171044112568390L, 161227168211013L, null, null, null, 161227168747589L },
                    { 171042505658439L, 161227168211013L, null, null, null, 161227168747590L },
                    { 171045383643206L, 161227168215110L, null, null, null, 161227168788550L },
                    { 171045341298758L, 161227168215109L, null, null, null, 161227168784454L },
                    { 187391980814408L, 174219034734663L, null, null, null, 187391980761157L },
                    { 187391980814407L, 161227168137287L, null, null, null, 187391980761157L },
                    { 187391371079751L, 184100551532613L, null, null, null, 187391371018309L },
                    { 187391371079750L, 184100551516229L, null, null, null, 187391371018309L },
                    { 187391074381896L, 174219034734665L, null, null, null, 187390547820613L },
                    { 187391074381895L, 161227168141382L, null, null, null, 187390547820613L },
                    { 187390759231563L, 174219034734664L, null, null, null, 187389970825285L },
                    { 187390759231562L, 174219034734661L, null, null, null, 187389970825285L },
                    { 187390759231561L, 161227168141381L, null, null, null, 187389970825285L },
                    { 171040100655174L, 161227168124998L, null, null, null, 161227168682053L },
                    { 187390759231560L, 161227168137285L, null, null, null, 187389970825285L }
                });

            migrationBuilder.InsertData(
                table: "PermissionApis",
                columns: new[] { "Id", "ApiId", "CreatedTime", "CreatedUserId", "CreatedUserName", "PermissionId" },
                values: new object[,]
                {
                    { 187390793699399L, 161227168137286L, null, null, null, 187375358951493L },
                    { 171044440813638L, 163579785756741L, null, null, null, 163579955331141L },
                    { 171044607758406L, 170317848662085L, null, null, null, 161807358345285L },
                    { 171044607758405L, 170317848645701L, null, null, null, 161807358345285L },
                    { 171044388511814L, 161227168251973L, null, null, null, 161227168759878L },
                    { 171044355190854L, 161227168247878L, null, null, null, 161227168759877L },
                    { 171044724113480L, 161227168247877L, null, null, null, 161227168755782L },
                    { 171044724113479L, 161227168243781L, null, null, null, 161227168755782L },
                    { 171044306128966L, 161227168243783L, null, null, null, 161227168755781L },
                    { 171044276404294L, 161227168243782L, null, null, null, 161227168751686L },
                    { 171042505658440L, 161227168211014L, null, null, null, 161227168747590L },
                    { 187390793703493L, 174219034734662L, null, null, null, 187375358951493L },
                    { 171040049598534L, 161227168124997L, null, null, null, 161227168677958L },
                    { 171040330653766L, 161227168206918L, null, null, null, 161227168694342L },
                    { 171039935344712L, 161227168120902L, null, null, null, 161227168673862L },
                    { 189345990312005L, 174219034738764L, null, null, null, 189345990168645L },
                    { 188054835359813L, 174219034738763L, null, null, null, 188054834004037L },
                    { 188054776557640L, 174219034738762L, null, null, null, 188054776545349L },
                    { 188054776557639L, 174219034738759L, null, null, null, 188054776545349L },
                    { 188054719275078L, 174219034738761L, null, null, null, 188054719266885L },
                    { 171039984590918L, 161227168120903L, null, null, null, 161227168677957L },
                    { 171046127857734L, 161227168239686L, null, null, null, 161227168833606L },
                    { 171046300762182L, 161227168239685L, null, null, null, 161227168833605L },
                    { 171046199644230L, 161227168235591L, null, null, null, 161227168829509L },
                    { 171047159746632L, 161227168235590L, null, null, null, 161227168825414L },
                    { 171047159746631L, 161227168235589L, null, null, null, 161227168825414L },
                    { 188054258307141L, 188049296683077L, null, null, null, 188054258278469L },
                    { 185974955921478L, 161227168235589L, null, null, null, 161227168821318L },
                    { 171046899044422L, 161227168231494L, null, null, null, 161227168813126L },
                    { 171046827180104L, 161227168231493L, null, null, null, 161227168813125L },
                    { 171046827180103L, 161227168219206L, null, null, null, 161227168813125L },
                    { 171046740811848L, 161227168227398L, null, null, null, 161227168809029L },
                    { 171046740811847L, 161227168219205L, null, null, null, 161227168809029L },
                    { 171046647849030L, 161227168227397L, null, null, null, 161227168804933L },
                    { 171046614102086L, 161227168223302L, null, null, null, 161227168800838L },
                    { 171045702873158L, 161227168194629L, null, null, null, 161227168632901L },
                    { 171045671936072L, 161227168194630L, null, null, null, 161227168628806L },
                    { 171045671936071L, 161227168182342L, null, null, null, 161227168628806L },
                    { 171046015770694L, 161227168182342L, null, null, null, 161227168628805L },
                    { 185974955921477L, 161227168215111L, null, null, null, 161227168821318L },
                    { 188054341591109L, 174219034734674L, null, null, null, 188054341582917L },
                    { 188054656598086L, 174219034738760L, null, null, null, 188054656589893L }
                });

            migrationBuilder.InsertData(
                table: "PermissionApis",
                columns: new[] { "Id", "ApiId", "CreatedTime", "CreatedUserId", "CreatedUserName", "PermissionId" },
                values: new object[,]
                {
                    { 188054416900168L, 174219034738757L, null, null, null, 188054416891973L },
                    { 171039935344711L, 161227168079941L, null, null, null, 161227168673862L },
                    { 171039883370566L, 161227168120901L, null, null, null, 161227168673861L },
                    { 171039848452166L, 161227168116805L, null, null, null, 161227168669766L },
                    { 171039661600837L, 161227168182341L, null, null, null, 161227168665669L },
                    { 188054416900167L, 174219034734672L, null, null, null, 188054416891973L },
                    { 171039733657672L, 161227168178245L, null, null, null, 161227168657478L },
                    { 171039733657671L, 161227168170054L, null, null, null, 161227168657478L },
                    { 171039545122886L, 161227168174149L, null, null, null, 161227168657477L },
                    { 171039502520389L, 161227168170055L, null, null, null, 161227168653382L },
                    { 171036465147973L, 161227168190535L, null, null, null, 161227168649285L },
                    { 171036422099014L, 161227168190534L, null, null, null, 161227168645190L },
                    { 171039620800582L, 161227168178246L, null, null, null, 161227168661573L },
                    { 171036587671621L, 161227168182343L, null, null, null, 161227168645189L },
                    { 171036587671622L, 161227168190533L, null, null, null, 161227168645189L },
                    { 188054509035590L, 174219034738758L, null, null, null, 188054509027397L },
                    { 188799732666437L, 174219034734667L, null, null, null, 188799732494405L },
                    { 188799878713413L, 174219034734666L, null, null, null, 188799878676549L },
                    { 188799878713414L, 174219034734669L, null, null, null, 188799878676549L },
                    { 188799795204165L, 174219034734668L, null, null, null, 188799795101765L },
                    { 188799949889606L, 174219034734670L, null, null, null, 188799949844549L },
                    { 188799997497414L, 174219034734671L, null, null, null, 188799997452357L },
                    { 171055081529413L, 161227168186437L, null, null, null, 161227168641093L },
                    { 189095579377733L, 161227168186438L, null, null, null, 161227168641094L },
                    { 189095579377734L, 189095453691973L, null, null, null, 161227168641094L }
                });

            migrationBuilder.InsertData(
                table: "Permissions",
                columns: new[] { "Id", "Closable", "Code", "CreatedTime", "CreatedUserId", "CreatedUserName", "Description", "Enabled", "External", "Hidden", "Icon", "IsDeleted", "Label", "ModifiedTime", "ModifiedUserId", "ModifiedUserName", "NewWindow", "Opened", "ParentId", "Path", "PermissionEntityId", "Sort", "Type", "ViewId" },
                values: new object[,]
                {
                    { 161227168669765L, true, null, null, null, null, "", true, null, false, null, false, "接口管理", null, null, null, null, false, 161227168636997L, "/admin/api", null, 3, 2, 161227168440390L },
                    { 161227168743493L, true, null, null, null, null, "", true, false, false, "", false, "缓存管理", null, null, null, false, null, 161227168636997L, "/admin/cache", null, 7, 2, 161227168448582L },
                    { 161227168731206L, true, null, null, null, null, "", true, false, false, null, false, "角色权限", null, null, null, false, false, 161227168636997L, "/admin/role-permisson", null, 6, 2, 161227168448581L },
                    { 161227168702533L, true, null, null, null, null, "", true, null, false, null, false, "权限管理", null, null, null, null, false, 161227168636997L, "/admin/permission", null, 5, 2, 161227168444486L },
                    { 161227168686149L, true, null, null, null, null, "", true, null, false, "", false, "视图管理", null, null, null, null, null, 161227168636997L, "/admin/view", null, 4, 2, 161227168444485L },
                    { 161227168751685L, true, null, null, null, null, "", true, false, false, "", false, "租户管理", null, null, null, false, null, 161227168636997L, "/admin/tenant", null, 8, 2, 161227168448583L },
                    { 161227168653381L, true, null, null, null, null, "", true, null, false, "", false, "角色管理", null, null, null, null, false, 161227168636997L, "/admin/role", null, 2, 2, 161227168440389L },
                    { 188053882503237L, true, null, null, null, null, "", true, false, false, "", false, "部门管理", null, null, null, false, null, 188049591447621L, "/personnel/organization", null, 0, 2, 174312361087045L },
                    { 161227168624709L, true, null, null, null, null, "", true, false, false, "el-icon-setting", false, "个人设置", null, null, null, false, false, 161227168464965L, "/account/settings", null, 1, 2, 161227168436293L },
                    { 187055743545413L, true, null, null, null, null, "", true, false, false, "", false, "数据字典", null, null, null, false, null, 161227168763974L, "/admin/dictionary/index", null, 0, 2, 187053736300613L },
                    { 188799375847493L, true, null, null, null, null, "", true, false, false, "", false, "员工管理", null, null, null, false, null, 188049591447621L, "/personnel/employee", null, 0, 2, 188792508244037L },
                    { 188050115035205L, true, null, null, null, null, "", true, false, false, "", false, "岗位管理", null, null, null, false, null, 188049591447621L, "/personnel/position", null, 0, 2, 174312361132101L },
                    { 161227168796741L, true, null, null, null, null, "", true, true, false, "el-icon-notebook-2", false, "文档管理", null, null, null, false, null, 161227168497734L, "/admin/document", null, 0, 2, 161227168456774L },
                    { 161227168632902L, false, null, null, null, null, "", true, false, false, "el-icon-notebook-2", false, "更新日志", null, null, null, false, false, 161227168497733L, "/", null, 1, 2, 161227168428101L },
                    { 161227168788549L, true, null, null, null, null, "", true, false, false, "", false, "操作日志", null, null, null, false, null, 161227168780358L, "/admin/opration-log", null, 2, 2, 161227168452678L },
                    { 161227168636998L, true, null, null, null, null, "", true, true, false, null, false, "用户管理", null, null, null, false, false, 161227168636997L, "/admin/user", null, 1, 2, 161227168436295L },
                    { 161227168784453L, true, null, null, null, null, "", true, false, false, "", false, "登录日志", null, null, null, false, null, 161227168780358L, "/admin/login-log", null, 1, 2, 161227168456773L }
                });

            migrationBuilder.CreateIndex(
                name: "IX_Audits_SaveChangesAuditId",
                table: "Audits",
                column: "SaveChangesAuditId");

            migrationBuilder.CreateIndex(
                name: "IX_Dictionaries_DictionaryTypeId",
                table: "Dictionaries",
                column: "DictionaryTypeId");

            migrationBuilder.CreateIndex(
                name: "IX_DocumentImages_DocumentId",
                table: "DocumentImages",
                column: "DocumentId");

            migrationBuilder.CreateIndex(
                name: "IX_PermissionApis_ApiId",
                table: "PermissionApis",
                column: "ApiId");

            migrationBuilder.CreateIndex(
                name: "IX_PermissionApis_PermissionId",
                table: "PermissionApis",
                column: "PermissionId");

            migrationBuilder.CreateIndex(
                name: "IX_Permissions_PermissionEntityId",
                table: "Permissions",
                column: "PermissionEntityId");

            migrationBuilder.CreateIndex(
                name: "IX_Permissions_ViewId",
                table: "Permissions",
                column: "ViewId");

            migrationBuilder.CreateIndex(
                name: "IX_RolePermissions_PermissionId",
                table: "RolePermissions",
                column: "PermissionId");

            migrationBuilder.CreateIndex(
                name: "IX_RolePermissions_RoleId",
                table: "RolePermissions",
                column: "RoleId");

            migrationBuilder.CreateIndex(
                name: "IX_UserRoles_RoleId",
                table: "UserRoles",
                column: "RoleId");

            migrationBuilder.CreateIndex(
                name: "IX_UserRoles_UserId",
                table: "UserRoles",
                column: "UserId");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "Audits");

            migrationBuilder.DropTable(
                name: "Books");

            migrationBuilder.DropTable(
                name: "Dictionaries");

            migrationBuilder.DropTable(
                name: "DocumentImages");

            migrationBuilder.DropTable(
                name: "LoginLogs");

            migrationBuilder.DropTable(
                name: "OprationLogs");

            migrationBuilder.DropTable(
                name: "PermissionApis");

            migrationBuilder.DropTable(
                name: "RolePermissions");

            migrationBuilder.DropTable(
                name: "UserRoles");

            migrationBuilder.DropTable(
                name: "SaveChangesAudits");

            migrationBuilder.DropTable(
                name: "DictionariesTypes");

            migrationBuilder.DropTable(
                name: "Documents");

            migrationBuilder.DropTable(
                name: "Apis");

            migrationBuilder.DropTable(
                name: "Permissions");

            migrationBuilder.DropTable(
                name: "Roles");

            migrationBuilder.DropTable(
                name: "Users");

            migrationBuilder.DropTable(
                name: "Views");
        }
    }
}
